using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace FreeSqlLearn {

	[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
	public partial class sys_OperationLog {

		[JsonProperty, Column(IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		[JsonProperty]
		public Guid? JxCode { get; set; }

		/// <summary>
		/// 登录IP
		/// </summary>
		[JsonProperty, Column(DbType = "varchar(50)", CanInsert = false)]
		public string LoginIp { get; set; } = "";

		/// <summary>
		/// 操作内容
		/// </summary>
		[JsonProperty, Column(StringLength = -2)]
		public string OperContent { get; set; }

		/// <summary>
		/// 操作时间
		/// </summary>
		[JsonProperty, Column(InsertValueSql = "getdate()", CanInsert = false)]
		public DateTime? OperDate { get; set; }

		/// <summary>
		/// 操作人登录名
		/// </summary>
		[JsonProperty, Column(DbType = "varchar(50)", CanInsert = false)]
		public string OperName { get; set; } = "";

		/// <summary>
		/// 操作对象ID
		/// </summary>
		[JsonProperty, Column(StringLength = 50, CanInsert = false)]
		public string OperObjId { get; set; } = "N'((0))'";

		/// <summary>
		/// 操作对象类型，0：无操作对象，1：对学员，2：对教练
		/// </summary>
		[JsonProperty, Column(CanInsert = false)]
		public int? OperObjType { get; set; } = 0;

		/// <summary>
		/// 操作页面
		/// </summary>
		[JsonProperty, Column(DbType = "varchar(100)", CanInsert = false)]
		public string OperPage { get; set; } = "";

		/// <summary>
		/// 操作因由
		/// </summary>
		[JsonProperty, Column(DbType = "varchar(50)", CanInsert = false)]
		public string OperReason { get; set; } = "";

		/// <summary>
		/// 日志类型，0：普通操作日志，1：业务流转日志，2：系统管理日志
		/// </summary>
		[JsonProperty, Column(CanInsert = false)]
		public int? OperType { get; set; } = 0;

		/// <summary>
		/// 是否与金钱相关，0：无关，1:有关
		/// </summary>
		[JsonProperty, Column(CanInsert = false)]
		public int? RelatedCharge { get; set; } = 0;

	}

}
